<template>
	<view>
		<view class="m30">
			<view class="bgFff p10 radius50 flex-jus">
				<u-search placeholder="输入你要找的政策" v-model="keyword" clearabled bgColor="#fff"
					:showAction="false"></u-search>
				<view>
					<u-button color="#FFDE6D" :customStyle="{'color':'#34314F','padding':'0 40rpx'}" shape="circle"
						@click="getpolicysList()">搜索</u-button>
				</view>
			</view>
			<u-gap height="20"></u-gap>
			<view class="">
				<view class="item flex-jus" v-for="(item,index) in listData" :key="index">
					<view class="left-box">
						<view class="textoverflow f28 c343">{{item.title}}</view>
						<view class="textoverflow mt10 f24 c999">来源：{{item.zoneCategory.origin}}</view>
					</view>
					<view class="">
						<u-button color="#E2EFFF" :customStyle="{'color':'#0066FD'}" shape="circle"
							 @click="nologinJump('/foodpages/things/detail?id='+item.id)">政策解读</u-button>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {getpolicysList} from '@/common/api_things.js'
	export default {
		name:'',
		data() {
			return {
				keyword:'',
				listData:[]
			}
		},
		onLoad(option) {
			this.getpolicysList()
		},
		methods: {
			async getpolicysList(){
				uni.showLoading({
					mask:true
				})	
				const res = await getpolicysList({
					title:this.keyword
				})
				if(res.code == 200){
					this.listData = res.data
				}
				uni.hideLoading()
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F0F7FF;
	}
	.item{
		padding-bottom: 30rpx;
		margin-bottom: 30rpx;
		border-bottom: 1px solid #ddd;
	}
	.left-box{
		width: 70%;
	}
</style>
